# -*- coding: utf-8 -*-

from marshmallow import Schema, EXCLUDE

from ...utils.exceptions import WechatParserException


class ParserBase(Schema):
    class Meta:
        unknown = EXCLUDE

    def handle_error(self, exc, data):
        raise WechatParserException(
            errcode=991001,
            message=exc.messages,
        )
